<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<html>
<head>
    <title>空气检测</title>
    <style>
        .p{
            width: 900px;
            margin-left: 500px;
        }

        .p1{
            margin-left: 450px;
        }
        .p2{
            margin-left: 400px;
        }
        th{
            background-color: aquamarine;
        }
        .p3{
            background-color: lawngreen ;
        }
    </style>
</head>
<body>
<form action="indexSelect">
    <div class="p"><h2>空气质量检测信息库</h2></div>
    <div></div>
    <div class="p1">按区域查询
        <select name="quyu">
            <option>西城区</option>
            <option>东城区</option>
            <option>海定区</option>
            <option>丰台区</option>
        </select>
        <button type="submit">查找</button>
        <a href="add.jsp">添加空气质量信息</a>

    </div>
    <div></div>
    <div class="p2">
        <table class="list">
            <tr>
                <th>序号</th>
                <th>区域</th>
                <th>检测时间</th>
                <th>PM10数据</th>
                <th>PM2.5数据</th>
                <th>监测站</th>
                <th>信息操作</th>
            </tr>
            <% int num=0; %>
            <c:forEach var="f" items="${first}">
                <%num++;
                    if(num%2==0){%>
                <tr class="p3" >
                    <td>${f.id}</td>
                    <td><a href="">${f.districtId}</a> </td>
                    <td>${f.monitorTime}</td>
                    <td>${f.pm10}</td>
                    <td>${f.pm25}</td>
                    <td>${f.monitoringStation}</td>
                    <td><a href="/uaDate?id=${f.id}">维护</a></td>
                </tr>
                <%
                }else {%>
                <tr class="">
                    <td>${f.id}</td>
                    <td><a href="">${f.districtId}</a> </td>
                    <td>${f.monitorTime}</td>
                    <td>${f.pm10}</td>
                    <td>${f.pm25}</td>
                    <td>${f.monitoringStation}</td>
                    <td><a href="/uaDate?id=${f.id}">维护</a></td>
                </tr>
                <%
                    }
                %>

            </c:forEach>
        </table>
    </div>
</form>
</body>
</html>

